<template>
	<view>
		<view class="bg">
			<image class="img-110" :src="oemObj.logoDiagram ? oemObj.logoDiagram : '../../static/110.png'"></image>
			<view class="display-fw-a">
				<view class="data-top">
					<view class="data-num">
						<view>
							<mosowe-number-run :number="set.serviceMerchant" :leep="1000"></mosowe-number-run>
						</view>
						<view>/家</view>
					</view>
					<view class="data-name">服务商户</view>
				</view>
				<view class="data-top">
					<view class="data-num">
						<view>
							<mosowe-number-run :number="set.videClipNumber" :leep="1000"></mosowe-number-run>
						</view>
						<view>/条</view>
					</view>
					<!-- <view class="data-num">{{set.videClipNumber}}<span>/条</span></view> -->
					<view class="data-name">视频剪辑数</view>
				</view>
				<view class="data-top">
					<view class="data-num">
						<view>
							<mosowe-number-run :number="set.exposureTimes" :leep="1000"></mosowe-number-run>
						</view>
						<view>/万</view>
					</view>
					<!-- <view class="data-num">{{set.exposureTimes}}<span>/亿</span></view> -->
					<view class="data-name">全网曝光次</view>
				</view>
				<view class="data-top">
					<view class="data-num">
						<view>
							<mosowe-number-run :number="set.accountAuthorization" :leep="1000"></mosowe-number-run>
						</view>
						<view>/个</view>
					</view>
					<!-- <view class="data-num">{{set.accountAuthorization}}<span>/个</span></view> -->
					<view class="data-name">账号授权</view>
				</view>
				<view class="data-top">
					<!-- <view class="data-num">{{set.eventMarketing}}<span>/场</span></view> -->
					<view class="data-num">
						<view>
							<mosowe-number-run :number="set.eventMarketing" :leep="1000"></mosowe-number-run>
						</view>
						<view>/场</view>
					</view>
					<view class="data-name">活动营销</view>
				</view>
				<view class="data-top">
					<view class="data-num">
						<view>
							<mosowe-number-run :number="set.szrClip" :leep="1000"></mosowe-number-run>
						</view>
						<view>/条</view>
					</view>
					<!-- <view class="data-num">{{set.szrClip}}<span>/条</span></view> -->
					<view class="data-name">数字人剪辑</view>
				</view>
			</view>
			<image class="img-109" src="../../static/109.png"></image>
			<view class="display-fw-a">
				<view class="frame" @click="open(4)">
					<image class="img-119" src="../../static/119.png"></image>
					<view class="color_333333 font-size_26rpx">视频剪辑</view>
				</view>
				<view class="frame" @click="open(1)">
					<image class="img-119" src="../../static/120.png"></image>
					<view class="color_333333 font-size_26rpx">矩阵发布</view>
				</view>
				<view class="frame" @click="open(7)">
					<image class="img-119" src="../../static/121.png"></image>
					<view class="color_333333 font-size_26rpx">同城爆店码</view>
				</view>
				<view class="frame" @click="open(2)">
					<image class="img-119" src="../../static/118.png"></image>
					<view class="color_333333 font-size_26rpx">数字人剪辑</view>
				</view>
				<view class="frame" @click="open(5)">
					<image class="img-119" src="../../static/117.png"></image>
					<view class="color_333333 font-size_26rpx">云闪推</view>
				</view>
				<view class="frame" @click="open(3)">
					<image class="img-119" src="../../static/116.png"></image>
					<view class="color_333333 font-size_26rpx">现场大屏</view>
				</view>
				<view class="frame" @click="open(6)">
					<image class="img-119" src="../../static/114.png"></image>
					<view class="color_333333 font-size_26rpx">抖支付</view>
				</view>
				<view class="frame" @click="open(8)">
					<image class="img-119" src="../../static/113.png"></image>
					<view class="color_333333 font-size_26rpx">通知公告</view>
				</view>
				<view class="frame" @click="open(9)">
					<!-- <image class="img-119" src="../../static/Frame (2).png"></image> -->
					<view class="color_333333 font-size_26rpx">商家配置</view>
				</view>
				<view class="frame" @click="callPhone()">
					<image class="img-119" src="../../static/115.png"></image>
					<view class="color_333333 font-size_26rpx">联系客服</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				set: {},
				
				oemObj: {},
				
			}
		},
		
		onLoad() {
			
		},
		
		onShow() {
			if (uni.getStorageSync('staffId')) {
				uni.reLaunch({
					url: '/pages/index/writeOffPage'
				})
				return;
			}
			this.getMobilePageConfiguration();
			this.selectDomainName();
		},
		
		methods: {
			
			//拨打电话
			callPhone() {
				if (this.oemObj.phone) {
					this.$sun.phone(this.oemObj.phone);
				} else {
					this.$sun.toast("暂无联系方式", 'error');
				}
			},
			
			open(type) {
				//1矩阵发布  2数字人剪辑  3现场大屏 
				//4视频剪辑  5云闪推  6抖支付
				//7同城爆店码  8更新通知
				if (type == 7) {
					
					if (uni.getStorageSync('staffId')) {
						uni.reLaunch({
							url: '/pages/index/writeOffPage'
						})
						return;
					}
					
					if (uni.getStorageSync('merchantId')) {
						uni.navigateTo({
							url: '/pages/index/index'
						})
					}else {
						uni.navigateTo({
							url: '/pages/index/login?type='+type
						})
					}
					
				}else if (type == 8) {
					uni.navigateTo({
						url: '/pages/index/log'
					})
				}else if(type == 6){
					if (uni.getStorageSync('merchantId')) {
						uni.navigateTo({
							url: '/pages/doPay/doPay'
						})
					}else {
						uni.navigateTo({
							url: '/pages/index/login?type='+type
						})
					}
				
				
				}else if(type == 9){
					if (uni.getStorageSync('merchantId')) {
						uni.navigateTo({
							url: '/pages/merchantConfiguration/merchantConfiguration'
						})
					}else {
						uni.navigateTo({
							url: '/pages/index/login?type='+type
						})
					}
				
				
				}else {
					uni.navigateTo({
						url: '/pages/index/detail?type='+type + '&id='+ this.set.id
					})
				}
			},
			
			
			async selectDomainName() {
				const result = await this.$http.get({
					url: this.$api.getSelectDomainName,
					data: {
						domainName: window.location.origin
						// window.location.origin
					}
				});
				if (result.code == 2000) {
					this.oemObj = result.data;
				} else {
					this.$sun.toast(result.msg, 'none');
				}
			},
			
			//首页数据
			async getMobilePageConfiguration() {
				const result = await this.$http.post({
					url: this.$api.mobilePageConfiguration
				});
				if (result.code == 2000) {
					this.set = result.data;
				} else {
					this.$sun.toast(result.msg, 'none');
				}
			},
			
		}
	}
</script>

<style lang="scss">
	
	/deep/.number-item {
		font-size: 40rpx;
		font-weight: bold;
		margin-right: 4rpx;
	}
	
	.img-119 {
		width: 64rpx;
		height: 64rpx;
		margin-bottom: 20rpx;
		margin-top: 40rpx;
	}
	
	.frame {
		width: 200rpx;
		height: 200rpx;
		border-radius: 20rpx;
		background: rgba(255, 255, 255, 0.90);
		backdrop-filter: blur(4rpx);
		margin-left: 36rpx;
		margin-bottom: 40rpx;
		text-align: center;
	}
	
	.img-109 {
		width: 696rpx;
		height: 244rpx;
		margin: 44rpx 0 64rpx 26rpx;
	}
	
	.data-name {
		color: rgba(255, 255, 255, 0.80);
		font-size: 26rpx;
	}
	
	.data-num {
		width: 250rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 0 10rpx;
		color: #FFF;
		// font-weight: bold;
		// font-size: 36rpx;
		margin-bottom: 8rpx;
		span {
			font-size: 28rpx;
			font-weight: 400;
		}
	}
	
	.data-top {
		text-align: center;
		width: 250rpx;
		margin-bottom: 30rpx;
	}
	
	.img-110 {
		width: 716rpx;
		height: 272rpx;
		margin-left: 16rpx;
		margin-bottom: 54rpx;
	}
	
	.bg {
		width: 750rpx;
		// height: 1790rpx;
		background: url('~static/107.png');
		background-size: contain;
		background-repeat: no-repeat;
		padding-top: 90rpx;
	}
	
	page {
		background-color: #010856;
	}
	
</style>
